<ion-header>
    <ion-navbar>
        <ion-title>浏览未接订单</ion-title>
    </ion-navbar>
</ion-header>
<ion-content>
    <ion-card *ngIf="!orderList||orderList.length==0">
        <ion-card-content>
            <ion-card-title>
                暂无订单
            </ion-card-title>
        </ion-card-content>
    </ion-card>
    <ion-card *ngFor="let item of orderList; let i = index">
        <ion-card-content>
            <img *ngIf="item.photos&&item.photos.length>0" src="{{item.photos[0]}}"/> 
            <ion-card-title>
                {{item.typeName}}
            </ion-card-title>
          <ion-row>
            <ion-col>
              <p>
               发布者:{{item.publisher}}
              </p>
            </ion-col>
            <ion-col>
              <p>
                单价:{{item.price}} 
              </p>
            </ion-col>
          </ion-row>
          <ion-row>
            
            <ion-col>
              <p>
                数量:{{item.number}}
              </p>
            </ion-col>
            <ion-col>
              <p> 订单号:{{item.code}} </p>
            </ion-col>
          </ion-row>
        </ion-card-content>
        <ion-row >
            <ion-col></ion-col>
            <ion-col *ngIf="item.recipient_id"></ion-col>
            <ion-col>
                <button ion-button icon-left clear small (click)="toDetailOrder(item)">
                <div>订单详情</div>
              </button>
            </ion-col>
            <ion-col *ngIf="!item.recipient_id">
              <button ion-button icon-left clear small    (click)="recipientOrder(item)">
                <div>承接订单</div>
              </button>
            </ion-col>
          </ion-row>
    </ion-card>
</ion-content>
